<template>
	<view class="sh-order-box u-flex u-m-b-10 u-p-r-20">
		<view class="order-box u-flex">
			<view class="order-item u-flex-col " @tap="jump('/pages/user/wallet/index')">
				<view class="u-flex-col item-box u-col-center">
					<text class="wallet-item__detail item-balance u-ellipsis-1">{{ userInfo.money || '0' }}</text>
					<text class="item-title">账户余额</text>
				</view>
			</view>
			<view class="order-item u-flex-col "  @tap="jump('/pages/user/wallet/score-balance')">
				<view class="u-flex-col item-box u-col-center">
					<text class="wallet-item__detail item-score u-ellipsis-1">{{ userInfo.score || '0' }}</text>
					<text class="item-title">积分</text>
				</view>
			</view>
			<view class="order-item u-flex-col "  @tap="jump('/pages/app/coupon/list')">
				<view class="u-flex-col item-box u-col-center">
					<text class="wallet-item__detail item-coupon u-ellipsis-1">{{ userOtherData.coupons_num || '0' }}</text>
					<text class="item-title">优惠券</text>
				</view>
			</view>
			<view class="order-item u-flex-col " @tap="jump('/goodsPage/vip/vip')">
				<view class="u-flex-col item-box u-col-center">
					<image src="../../../static/images/outpatient/vip0.png" mode="" class="order-img3" v-if="userInfo.level == 0"></image>
					<image src="../../../static/images/outpatient/vip1.png" mode="" class="order-img2" v-if="userInfo.level == 1"></image>
					<image src="../../../static/images/outpatient/vip2.png" mode="" class="order-img2" v-if="userInfo.level == 2"></image>
					<image src="../../../static/images/outpatient/vip3.png" mode="" class="order-img2" v-if="userInfo.level == 3"></image>
					<!-- <text class="item-title item-title2" v-if="userInfo.level == 0">VIP会员</text>
					<text class="item-title item-title2" v-if="userInfo.level == 1">黄金会员</text>
					<text class="item-title item-title2" v-if="userInfo.level == 2">天使会员</text> -->
					<text class="item-title item-title2">会员等级</text>
				</view>
			</view>
		</view>
	
		<view class="order-item u-flex-col all-order " @tap="jump('/pages/user/wallet/index')">
			<image class="cut-off--line" :src="$IMG_URL + '/imgs/user/cut_off_line.png'" mode=""></image>
			<view class="u-flex-col item-box u-col-center">
				<image class="order-img" :src="$IMG_URL + '/imgs/user/wallet.png'" mode="aspectFill"></image>
				<text class="item-title">我的钱包</text>
			</view>
		</view>
	</view>
</template>

<script>
/**
 * 钱包样式卡片
 */
import { mapMutations, mapActions, mapState, mapGetters } from 'vuex';
export default {
	components: {},
	data() {
		return {};
	},
	computed: {
		...mapGetters(['userInfo', 'userOtherData'])
	},
	methods: {
		jump(path, query) {
			this.$Router.push({
				path: path,
				query: query
			});
		}
	}
};
</script>

<style lang="scss">
// 钱包卡片
.sh-order-box {
	height: 180rpx;
	background: #fff;
	position: relative;
	.item-balance::after {
		content: '元';
		font-size: 16rpx;
		margin-left: 4rpx;
	}
	.item-score::after {
		content: '个';
		font-size: 14rpx;
		margin-left: 4rpx;
	}
	.item-coupon::after {
		content: '张';
		font-size: 16rpx;
		margin-left: 4rpx;
	}
	.wallet-item__detail {
		font-size: 28rpx;
		text-align: center;
		font-weight: 500;
		color: rgba(168, 112, 13, 1);
	}
	.order-box {
		flex: 4;
	}
	.all-order {
		position: relative;
		.cut-off--line {
			position: absolute;
			top: 50%;
			transform: translateY(-50%);
			right: (750rpx/5) - 15rpx;
			width: 30rpx;
			height: 136rpx;
		}
	}

	.order-item {
		flex: 1;
		.item-box {
			position: relative;
		}
		.order-img {
			width: 46rpx;
			height: 46rpx;
		}
		.order-img2 {
			width: 58rpx;
			height: 50rpx;
		}
		.order-img3 {
			width: 50rpx;
			height: 50rpx;
		}
		.item-title {
			font-size: 26rpx;
			font-weight: 500;
			color: rgba(153, 153, 153, 1);
			line-height: 24rpx;
			margin-top: 20rpx;
		}
		.item-title2{
			position: relative;
			top: -4rpx;
		}
	}
}
</style>
